import request from '@/utils/request'

// 获取品种下的数据表
export function getVarietySheet(params) {
  return request({
    url: '/v1/datalib/variety/sheet/',
    method: 'get',
    params,
  })
}

// 查询数据表的详细数据
export function getSheetData(data) {
  return request({
    url: '/v1/datalib/variety/sheetData/',
    method: 'post',
    data,
  })
}

// 获取数据表下的图形列表
export function getSheetCharts(params) {
  return request({
    url: '/v1/datalib/variety/sheetChart/',
    method: 'get',
    params,
  })
}

// 获取品种下的数据图形
export function getVarietyChart(params) {
  return request({
    url: '/v1/datalib/variety/chart/',
    method: 'get',
    params,
  })
}

// 获取图形的配置
export function getChartOption(cid, new_color = true) {
  return request({
    url: '/v1/datalib/variety/chartOption/',
    method: 'get',
    params: { cid, new_color },
  })
}

// 查询图形对比解读
export function getChartCompares(params) {
  return request({
    url: '/v1/datan/sheetChart/chartCompare/',
    method: 'get',
    params,
  })
}
